package com.kaishengit.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.kaishengit.pojo.Filetype;
import com.kaishengit.pojo.Project;

@Repository
public class FiletypeDao extends BaseDao<Filetype, String> {

	public List<Filetype> findByProject(Project project) {
		String hql = "from Filetype where projectid = :id Order by createtime desc";
		Query query = getSession().createQuery(hql);
		query.setParameter("id", project);
		
		@SuppressWarnings("unchecked")
		List<Filetype> filetypeList = query.list();
		return filetypeList;
	}

	
	

}
